<template>
  <div class="all">
    <!-- 订阅消息 -->
    <div class="list" v-for="(item,index) in newsSubscriptionData" :key="index">
      <div class="pele">
        <img class="img" src="../../../img/home/nowater.png" alt />
        <span class="font">{{item.updateDate}}{{item.note}}</span>
      </div>
    </div>
  </div>
</template>
<script>
import {
    newLog
} from '@/api/baseManage/flMaintain/index'
export default {
  name:'newsSubscription',
  data() {
    return {
      // 后台返回的数据
      newsSubscriptionData:'',
      fontData: [
        {
          imgsrc: require("../../../img/home/th.png"),
          title: "2020.01.02 抄见率指标太低，请及时分析原因并汇报情况。"
        },
        {
          imgsrc: require("../../../img/home/nowater.png"),
          title: "2020.01.07 - 2020. 01.07 建设路中段供水管道抢修停水一日，请..."
        },
        {
          imgsrc: require("../../../img/home/th.png"),
          title: "2020.01.09  工单20200107023处理时间过长，请尽快处理。"
        },
        {
          imgsrc: require("../../../img/home/nowater.png"),
          title: "2020.01.02 - 2020. 01.03 新华路供水管道抢修停水两日，请通知..."
        },
        {
          imgsrc: require("../../../img/home/kpi.png"),
          title: "2020.01.02  回收率指标出现异常，请关注相关指标情况。"
        },
        {
          imgsrc: require("../../../img/home/kpi.png"),
          title: "2020.01.02  抄见率指标太低，请及时分析原因并汇报情况。"
        },
      ]
    };
  },
  methods:{
    // 获取消息订阅数据
    async getNewsSubscription(){
      const res = await newLog()
      console.log(res,'订阅消息');
      
      this.newsSubscriptionData = res.data
      // const newsSubscriptionData =res .data
      // for (let i = 0; i < newsSubscriptionData.length; i++) {
      //   const element = newsSubscriptionData[i];
        
      // }
    }
  },
  created(){
    this.getNewsSubscription()
  }
};
</script>
<style lang="scss" scoped>
.all {
    width: 100%;
    height: 100%;
    background: #fff;
    overflow: auto;
    margin: 5px;
  .list {
    margin: 10px 0px;
    line-height: 25px;
    .pele {
      display: flex;
      .img {
        margin: 3px 5px;
        width: 14px;
        height: 14px;
      }
      .font {
        flex: 100;
        font-size: 14px;
        
      }
    }
  }
}
</style>